<?php

namespace App\Models\FeishuCallingCard;

use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class FeishuCallingCardInvestmentEmployeeModel extends BaseModel
{
    use HasFactory;

    protected $table = 'feishu_calling_cards_investment_employee';


    protected $appends = [
        'form',
    ];


    public function getFormAttribute()
    {
        return 'form' . $this->id;
    }

    protected static $_allStaff = [];

    public static function allStaff()
    {
        if (!count(static::$_allStaff)) {
            static::$_allStaff = static::all()->keyBy('name')->toArray();
        }
        return static::$_allStaff;
    }

    const SELECT_ENUM = [
        0 => "未选中",
        1 => "选中",
    ];
}
